package com.abaaba.project2.controller;

import com.abaaba.project2.bean.bo.AdminFootprintBaseReq;
import com.abaaba.project2.bean.vo.AdminFootprintVo;
import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.service.AdminFootprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/footprint")
public class AdminFootprintController {
    @Autowired
    AdminFootprintService adminFootprintService;

    @RequestMapping("/list")
    public BaseRespVo getFootprintList(AdminFootprintBaseReq baseReq) {
        AdminFootprintVo adminFootprintVo = adminFootprintService.getFootprintList(baseReq.getPage(),
                baseReq.getLimit(), baseReq.getUserId(), baseReq.getGoodsId(), baseReq.getSort(),
                baseReq.getOrder());
        return BaseRespVo.ok(adminFootprintVo);
    }
}
